'use strict';

module.exports = mongoose => {
  const AppSchema = new mongoose.Schema({
    name: String,
    profile: {
      createTime: { type: Date, default: Date.now },
    },
    attributes: {     
      permits: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Permit' }],
    },
  });

  return mongoose.model('App', AppSchema);
};
